package com.example.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Data;

import java.math.BigDecimal;

/**
 * @author circle48
 */
@Data
@ApiModel(description = "评价表单数据")
public class EvaluationDTO {

    @ApiModelProperty("评价ID，新增不需要添加，更新必填")
    private Long id;


    @ApiModelProperty("skuID")
    private Long skuId;

    @ApiModelProperty("订单Sn")
    @JsonFormat(shape =JsonFormat.Shape.STRING )
    private String orderSn;

    @ApiModelProperty("评价的根id")
    private Long rootId;


    @ApiModelProperty("评价内容")
    @NotNull(message = "评价内容不能为空")
    @Size(max = 500, message = "评价内容长度不能超过500个字符")
    private String content;

    @ApiModelProperty("商品评分")
    private BigDecimal grade;

    @ApiModelProperty("服务评分")
    private Integer serviceScore;

    @ApiModelProperty("物流评分")
    private Integer deliveryScore;


    @ApiModelProperty("商品评分")
    private Integer goodScore;

    @ApiModelProperty("商品评价图片地址，多个地址以||分隔")
    private String images;

    @ApiModelProperty("订单小项id")
    private Long orderItemId;

    @ApiModelProperty("评价是否有图片")
    private Boolean haveImage;


}